#ifndef JTABWIDGET_H
#define JTABWIDGET_H

#include <QTEGui/qteguiglobal.h>
#include <QTabWidget>

class QToolButton;

namespace QTE
{

class JTabWidgetPrivate;

class QTEGUI_EXPORT JTabWidget : public QTabWidget
{
	Q_OBJECT

public:
	explicit JTabWidget(QWidget *parent = nullptr);
	~JTabWidget();

public:
	QToolButton *addButton();
	const QToolButton *addButton() const;

public:
	void setCornerWidget(QWidget *w, Qt::Corner corner = Qt::TopRightCorner);
	QWidget *cornerWidget(Qt::Corner corner = Qt::TopRightCorner) const;

Q_SIGNALS:
	void addTabRequested();

protected:
	void showEvent(QShowEvent *event) override;
	void resizeEvent(QResizeEvent *event) override;
	void tabInserted(int index) override;
	void tabRemoved(int index) override;

private:
	JTabWidgetPrivate *d_ptr;
};

} //namespace QTE


#endif //JTABWIDGET_H
